<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>最富有客户的资产总量</title>
</head>
<body>
  <script>
    var arr = [[1,5],[7,3],[3,5]]
    function fn(accounts) {
      let maxWealth = -Number.MAX_VALUE;
      for (const account of accounts) {
          maxWealth = Math.max(maxWealth, account.reduce((a, b) => a + b));
      }
      return maxWealth;
    }
    console.log(fn(arr));
  </script>
</body>
</html>